FROM tck-xinan-registry.cn-chengdu.cr.aliyuncs.com/wair/text2img-xdit:base_v1

USER root

WORKDIR /home/server
COPY . /home/server

RUN pip install -r requirements.txt -i  https://mirrors.aliyun.com/pypi/simple/ \
    && cd /home/server/diffusers && pip install -e .[torch] -i https://mirrors.aliyun.com/pypi/simple/
RUN cd /home/server/xdit && pip install -e ".[diffusers,flash-attn]" -i https://mirrors.aliyun.com/pypi/simple/ \
    && rm -rf /root/.cache/pip
    
CMD ["/bin/bash", "/home/server/start.sh"]